<script setup lang="ts">
import { useRouter } from 'vue-router';
const router = useRouter()
const props = defineProps({
  title: {
    type: String,
    default: ''
  },
  boxHeight: {
    type: String,
    default: '32%'
  }
})
const toMonitorDetail=()=>{

  router.push({
    path: '/bit-screen/monitor'
  })
}
</script>
<template>
  <div class="group_box" :style="{ height: boxHeight }">
    <div class="tit_box"  style="display: flex;justify-content: space-between">
      <p class="tit gradient-text" style="position: relative;top: 5px;">{{ title }} </p>
      <p class="more_text" @click="toMonitorDetail" v-if="title=='实时监控'">更多</p>

    </div>
    <div class="con_wrap">
      <slot></slot>
    </div>
  </div>
</template>

<style lang="less" scoped>
.group_box {
  position: relative;
  display: block;
  padding-top: 40px;
  height: calc(33.33% - 10px);
  background:
    url('@/assets/bit-screen/con_box_warp_hd.png') no-repeat left top/100% 48px,
    url('@/assets/bit-screen/con_box_warp_bd.png') no-repeat right bottom/100% calc(100% - 40px);
  margin-bottom: 10px;
  &:last-child {
    margin-bottom: 0;
  }
  .tit_box{
    position: absolute;
    left: 0;
    top: 0;
    height: 40px;
    line-height: 40px;
    width: 210px;
    text-align: left;
    font-size: 1vw;
    padding-left: 15px;
    font-style: italic;
    letter-spacing: 2px;
    width: 100%;
    overflow: hidden;
    color: #F6F9FE;
 &:first-child{
  color: red !important;
 }
  

    .more_text{
      font-size: 14px;
      position: absolute;
      top: 10px;
      right: 20px;
      color: #F6F9FE;
      text-shadow: 0px 2px 8px rgba(5,28,55,0.42);
      cursor: pointer;
   }
  }

  .con_wrap {
    display: flex;
    height: 100%;
    padding: 10px;
  }
}

@keyframes flow {
  from {
    left: -200px;
  }
  to {
    left: 300px;
  }
}
</style>
